package com.droidski.taskdb.model;

import java.io.Serializable;
import java.util.List;

public interface Task extends Serializable {

  /**
   * returns the unique ID of this task
   */
  public String getId();
  
  public String getEstimate();
  
  public void setEstimate(String estimate);
  
  /**
   * returns a short alias if one exists
   */
  public String getAlias();
  public void setAlias(String alias);
  /**
   * returns the textual name of this task
   */
  public String getName();

  /**
   * returns the textual name of this task
   */
  public void setName(String name);
  
  /**
   * returns a longer description of this task
   */
  public String getDescription();
  public void setDescription(String description);
  
  /**
   * indicates the current task status
   */
  public Status getStatus();
  
  public void setStatus(Status status, String comment);

  /**
   * returns the complete history of this task
   */
  public List<History> getHistory();
  
  /**
   * pauses the current work on this task
   */
  public void pause(String comment);
  /**
   * marks this task as COMPLETE
   */
  public void complete(String comment);
  
  public void start(String comment);
  
  public void abandon(String comment);
  
  /**
   * returns any subtasks on this task
   */
  public List<String> getChildren();
  /**
   * returns the 'parent' task
   */
  public Task getParent();
  public void setParent(Task parent);

  public List<Tag> getTags();

  public void addTask(Task task);
  
  public void removeTask(Task task);
  
  /**
   * returns the location the task was created from
   * @return
   */
  public String getLocation();
  
  /**
   * the total time spent on this task
   * @return
   */
  public long getTimeActual();
  
  /**
   * the amount of time between starting the task and NOW
   * @return
   */
  public long getTimeElapsed();
  
  /**
   * the total timeActual of all children and this task
   * @return
   */
  public long getTimeAccumulated();

  public long getTimeAccumulatedSince(long since);

  public void setPriority(String p);
  
  public String getPriority();
  
  public void setCategory(String p);
  
  public String getCategory();

  public void setProject(String p);
  
  public String getProject();

  public String getParentId();

  public int getSearchScore(String searchPhrase);
  
}


